package com.sign.fragment;

import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.widget.Toast;

public abstract class HandlerFragment extends Fragment{
	protected Handler mHandler = new Handler() {
		@Override
		public void handleMessage(Message msg) {
			hanldeMessage(msg);
		}

	};
	abstract void hanldeMessage(Message msg);

	protected void showLongMessage(int message) {
		Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_SHORT)
				.show();
	}
	
	protected void showLongMessage(String message) {
		Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_SHORT)
				.show();
	}
	
	
	protected void showShortMessage(String message) {
		Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_SHORT)
				.show();
	}
	
	protected void showShortMessage(int message) {
		Toast.makeText(getActivity().getApplicationContext(), message, Toast.LENGTH_SHORT)
				.show();
	}
	
	
}
